﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace netcore8.Inject
{
    public class ProductService
    {
        public ProductRepository _productRepository { set; get; }

        public ProductService(ProductRepository productRepository) { 
            this._productRepository = productRepository;
        }
    
        public void GetProduct() {
            _productRepository.GetProduct();
            Console.WriteLine($"查询商品成功：{this.GetHashCode()}");
        }
    }
}
